package com.lv.mall.ware.feign;

import com.lv.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author 吕经宇
 * @create 2022-02-19 15:24
 */
@FeignClient("mall-product")
public interface ProductFeignService {

    /**
     * openfeign
     * 1)让所有请求过网关  @FeignClient("mall-gateway")  给网关所在的机器发请求    配置好请求路径/api/product/skuinfo/info/{skuId}
     * 2）直接让后台指定服务处理
     *
     * @param skuId
     * @return
     */
    @RequestMapping("/product/skuinfo/info/{skuId}")
    public R info(@PathVariable("skuId") Long skuId);
}
